#ifndef LOGINREQUESTMESSAGE_H
#define LOGINREQUESTMESSAGE_H

#include "./entities/message/superClass/message.h"

/*
Json数据格式
{
    "messageType": [LoginRequest](int)
    "userId": [userId](string)
    "password": [password](string)
}
*/

class LoginRequestMessage : public Message
{
public:
    LoginRequestMessage() = delete;

    LoginRequestMessage(const UserId& userId, const Password& password);
    LoginRequestMessage(const QJsonObject&);
    QJsonObject PackJsonData() const override;
    UserId getUserId() const;
    Password getPassword() const;
    QString ToString();

private:
    UserId m_userId;
    Password m_password;

};

// 编译时注册
Q_DECLARE_METATYPE(LoginRequestMessage)

#endif // LOGINREQUESTMESSAGE_H
